package com.atguigu.service;

import com.atguigu.domain.Cart;
import com.atguigu.domain.Order;
import com.atguigu.domain.User;

import java.util.List;

/**
 * @author dl
 * @date 2020/5/4 15:13
 */
public interface OrderService {
    /**
     * 保存订单
     * @param cart
     * @param user
     * @return boolean
     */
    String checkout(Cart cart, User user);

    /**
     * 修改订单
     * @param orderId order id
     * @param status order status
     * @return boolean
     */
    void update(String orderId, String status);

    /**
     * 查询所有Order
     * @return
     */
    List<Order> listOrders();

    /**
     * 获取单个order
     * @param userId
     * @return
     */
    List<Order> getOrder(String userId);
}
